<?php 
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body style="font-family:Arial, Helvetica, sans-serif">
<h2>OLD **  Till <?php echo $this->dateBegin ?>  </h2>
<table width="650" border="1" cellspacing="1" cellpadding="5">
  <tr>
    <th scope="col">NO</th>
    <th scope="col">SCODE</th>
    <th scope="col">DESCRIPTION</th>
    <th scope="col">GN DATE</th>
  </tr>
<?php foreach($this->arrRes as $k => $v){?>  
  <tr>
    <td><?php echo $k + 1?></td>
    <td><?php echo $v[0];?></td>
    <td><?php echo $v[1];?></td>
    <td><?php echo $v[2];?></td>
  </tr>
<?php }?>  
</table>

</body>
</html>
<?php
file_put_contents(getcwd()."/OLD**".$this->dateBegin.".html", ob_get_contents());
ob_end_flush();
?>